<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css"
	href="./ext/resources/css/ext-all.css" />
<script type="text/javascript" src="./ext/ext-all.js"></script>
<script type="text/javascript" src="./ext/ext-lang-zh_CN.js"></script>
<script type="text/javascript" src="./js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="./highcharts/highcharts.js"></script>
<script type="text/javascript" src="./highcharts/exporting.js"></script>
<script type="text/javascript" src="./highcharts/themes/gray.js"></script>
<script type="text/javascript" src="./js_src/statisticcharts.js"></script>
<title>导出记录</title>
</head>
<body>
	<%
		String text = request.getParameter("text");
	%>
	<div id="tool_bar"
		style="margin-left: 100px; height: 180px; width: 90%; margin-right: 100px; margin-top: 20px"></div>
	<div id="user_feedback_statistics"
		style="width: 90%; margin-left: 100px; height: 700px; margin-right: 100px; margin-top: 20px"></div>
	<script type="text/javascript">
		var mWindow = Ext.create('Ext.panel.Panel', {
			title : "导出记录",
			region : "center",
			bodyStyle : 'padding:6px 0px 0px 15px',
			width : Ext.get("tool_bar").getWidth(),
			height : Ext.get("tool_bar").getHeight(),
			items : [ {
				xtype : 'datefield',
				fieldLabel : '开始时间',
				name : 'begin_date',
				id : 'begin_date',
				anchor : '100%',
				format : 'Y-m-d H:i:s',
				maxValue : new Date(),
				value : new Date(),
				padding : '10 5 3 10',
				width : 230,
				labelWidth : 70,
				height : 20,
			}, {
				xtype : 'datefield',
				fieldLabel : '结束时间',
				name : 'end_date',
				id : 'end_date',
				anchor : '100%',
				format : 'Y-m-d H:i:s',
				maxValue : new Date(),
				value : new Date(),
				padding : '10 5 3 10',
				width : 230,
				labelWidth : 70,
				height : 20,
			} , {
				xtype : 'button',
				style : "margin-left:85px",
				text : '导出',
				handler : function() {
					var text="<%=text%>";
					var beginTime = Ext.getCmp("begin_date").getValue();
					beginTime = Ext.Date.format(new Date(beginTime), 'Y-m-d');
					var endTime = Ext.getCmp("end_date").getValue();
					endTime = Ext.Date.format(new Date(endTime), 'Y-m-d');
					var newUrl ='exportExcel?text='+text+'&beginTime='+beginTime+'&endTime='+endTime;
					window.location.href=newUrl;
				}
			} ],
			renderTo : 'tool_bar',
		});
	</script>
</body>
</html>